/*public class Test {
    public static void main(String[] args) {
        int[] array = {2,2,2,2,3,3,4,4,5,6,7,7};
        int val = 2;

        Solution(array, val);
    }

    private static int  Solution(int[] array, int val) {
        int[] tmp = new int[array.length];
        int j = 0;
        for (int i = 0; i < array.length -1; i++) {
            if(array[i] != val){
                tmp[j] = array[i];
                j++;
            }
        }
        for (int i = 0; i < j; i++) {
            array[i] = tmp[i];
            System.out.print(array[i]);
        }
        return j;
    }

}*/
